const { createProxyMiddleware } = require('http-proxy-middleware');
// http://create-react-app.dev/docs/proxying-api-requests-in-development#docsNav
module.exports = function (app){
  app.use('/api', createProxyMiddleware({ 
    target: 'http://rap2.taobao.org:38080/app/mock',
    secure: false,
    changeOrigin: true,
    pathRewrite: {
     "^/api": "/"
    },
  }))
}
